package com.znf.base.exception;

import com.znf.base.enums.ResultCodeEnum;
import lombok.Data;

@Data
public class BizException extends RuntimeException {

    private String code = "-1";
    private String msg;

    public BizException(ResultCodeEnum resultCodeEnum) {
        this.code = resultCodeEnum.getCode();
        this.msg = resultCodeEnum.getMsg();
    }

    public BizException(String msg) {
        this.msg = msg;
    }
}
